from selenium.webdriver.common.by import By
from selenium.webdriver.common.devtools.v85.layer_tree import load_snapshot

from base import Base
class Page(Base):
    def kuang(self):
        loc=(By.ANDROID_UIAUTOMATOR,'new UiSelector().text("搜商品名称 作者 出版社 ISBN")')
        ele=self.find_loc(loc)
        return ele
    def shuru(self):
        loc=(By.CLASS_NAME,'android.widget.EditText')
        ele=self.find_loc(loc)
        return ele
    def sousuo(self):
        loc=(By.ID,'com.kongfz.app:id/tvSearch')
        ele=self.find_loc(loc)
        return ele

    def tu(self):
        loc=(By.XPATH,'(//android.widget.ImageView[@resource-id="com.kongfz.app:id/ivPic"])[7]')
        ele=self.find_loc(loc)
        return ele
    def fan(self):
        loc=(By.XPATH,'//androidx.compose.ui.platform.ComposeView[@resource-id="com.kongfz.app:id/compose_view"]/android.view.View/android.view.View[2]/android.view.View[1]')
        ele=self.find_loc(loc)
        return ele
    def fan2(self):
        loc=(By.ID,'com.kongfz.app:id/iv_back')
        ele=self.find_loc(loc)
        return ele

    def duanyan(self):
        loc=(By.ID,'com.kongfz.app:id/tv_nav_name1')
        ele=self.find_loc(loc)
        return ele

    def duanyan2(self):
        loc=(By.ID,'com.kongfz.app:id/tv_nav_name2')
        ele=self.find_loc(loc)
        return ele

    def duanyan3(self):
        loc=(By.ID,'com.kongfz.app:id/tv_nav_name3')
        ele=self.find_loc(loc)
        return ele

